package org.principles.demo3.after;

public class Computer {
    private Cpu cpu;

    private Memory memory;

    private HarDisk harDisk;

    public Cpu getCpu() {
        return cpu;
    }

    public void setCpu(Cpu cpu) {
        this.cpu = cpu;
    }

    public Memory getMemory() {
        return memory;
    }

    public void setMemory(Memory memory) {
        this.memory = memory;
    }

    public HarDisk getHarDisk() {
        return harDisk;
    }

    public void setHarDisk(HarDisk harDisk) {
        this.harDisk = harDisk;
    }

    public void run() {
        cpu.run();
        harDisk.save("test data");
        System.out.println(harDisk.get());
        memory.save();
    }
}
